(deftemplate person (slot gender) (slot age) (slot status))
(deftemplate activity (slot spareTime) (slot hobby))
(deftemplate present (slot budget))

(defrule P1
	(person (gender "m") )
	=>
	(printout t "console game;"))
	
(defrule P2
	(person (gender "f") )
	=>
	(printout t "boneka;"))
	
(defrule P3
	(person (age "k10"))
	=>
	(printout t "boneka;buku bacaan;alat tulis;robot;"))
	
(defrule P4
	(person (age "a1015"))
	=>
	(printout t "jam tangan;sepeda;console game;alat musik"))
	
(defrule P5
	(person (age "a1620"))
	=>
	(printout t "alat olahraga;handphone"))
	
(defrule P6
	(person (age "l20"))
	=>
	(printout t "perhiasan;smartphone;busana"))
	
(defrule P7
	(person (status "single"))
	=>
	(printout t "perhiasan;busana;"))
	
(defrule P8
	(person (status "married"))
	=>
	(printout t "kitchen set;dining set;tea set;"))
	
(defrule P9
	(activity (spareTime "k1"))
	=>
	(printout t "handphone;jam tangan;kamera;"))
	
(defrule P10
	(activity (spareTime "a15"))
	=>
	(printout t "alat olahraga;sepeda;"))
	
(defrule P11
	(activity (spareTime "a510"))
	=>
	(printout t "buku bacaan;alat musik;"))
	
(defrule P12
	(activity (spareTime "l10"))
	=>
	(printout t "dvd;dvd player;console game;"))
	
(defrule P13
	(activity (hobby "indoor"))
	=>
	(printout t "console game;buku bacaan;alat musik;dvd;dvd player"))
	
(defrule P10
	(activity (hobby "outdoor"))
	=>
	(printout t "sepeda;"))
	
(defrule P11
	(present (budget "k100"))
	=>
	(printout t "alat tulis;boneka;buku bacaan;dvd;"))
	
(defrule P12
	(present (budget "k100500"))
	=>
	(printout t "busana;alas kaki;kitchen set;dining set;tea set;"))
	
(defrule P13
	(present (budget "l500"))
	=>
	(printout t "handphone;smartphone;laptop;mobil;sepeda motor;"))
	
(defrule P14
	(person (gender "m") (status "single"))
	=>
	(printout t "jam tangan;"))
	
(defrule P15
	(person (gender "m") (status "married"))
	=>
	(printout t "buku bacaan;"))
	
(defrule P16
	(person (gender "f") (status "single"))
	=>
	(printout t "perhiasan;"))
	
(defrule P17
	(person (gender "f") (status "married"))
	=>
	(printout t "kitchen set;"))

(defrule P18
	(person (status "single"))
	(present (budget "k100"))
	=>
	(printout t "buku bacaan;"))
	
(defrule P19
	(person (status "single"))
	(present (budget "a100500"))
	=>
	(printout t "dvd;"))
	
(defrule P20
	(person (status "single"))
	(present (budget "l500"))
	=>
	(printout t "alat musik;"))
	
(defrule P21
	(person (status "married"))
	(present (budget "k100"))
	=>
	(printout t "jam dinding;"))
	
(defrule P22
	(person (status "married"))
	(present (budget "a100500"))
	=>
	(printout t "dining set;"))
	
(defrule P23
	(person (status "married"))
	(present (budget "l500"))
	=>
	(printout t "kamera;"))